package cameratricks;

import processing.core.PApplet;
import processing.video.Capture;
import hypermedia.video.OpenCV;

public class Otsuizer implements Renderer {
	Capture capture;
	PApplet p;
	
	public Otsuizer(TrickCarousel p) {
		this.capture = p.getCapture();
		this.p = p;
	}
	
	public void draw(OpenCV opencv) {
	  	opencv.threshold(50, 150, OpenCV.THRESH_OTSU );    // set black & white threshold
	  	p.image(opencv.image(), 0, 0);
	}

}
